g_object_unref (window);
}
- else if (private->bg_pixmap != GDK_NO_BG)
+ else if (private->bg_pixmap != GDK_NO_BG &&
+ private->window_type != GDK_WINDOW_FOREIGN)
{
/* No exposure mask set, so nothing will be drawn, the
* app relies on the background being what it specified
* for the window. So, we need to clear this manually.
*
+ * For foreign windows if expose is not set that generally
+ * means some other client paints them, so don't clear
+ * there.
+ *
* We use begin/end_paint around the clear so that we can
* piggyback on the implicit paint */
GdkRegion *update_area = private->update_area;
private->update_area = NULL;
- if (_gdk_event_func && gdk_window_is_viewable (window) &&
- private->window_type != GDK_WINDOW_FOREIGN)
+ if (_gdk_event_func && gdk_window_is_viewable (window))
{
GdkRegion *expose_region;
gboolean end_implicit;